Java Platform, Micro Edition (Java ME®) is a Java® platform primarily targeted to relatively limited mobile and/or embedded devices including but not limited to mobile/cell phones, smart phones, tablet or pad device, Personal Digital Assistants (PDAs), cameras, control devices, set-top boxes, game consoles, home appliances, and so on. Java and Java ME are trademarks or registered trademarks of Oracle, Inc. and/or its affiliates in the United States and other countries.
FIG. 1 is a block diagram illustrating a conventional Java ME® platform stack 20 on a device. A virtual machine (VM) 22 and a configuration 24 are layered on top of an operating system (OS) 10 of the device. Example VMs include the Java Virtual Machine (JVM) and the Kernel Virtual Machine (KVM). A configuration 24 provides a set of lower level application programming interfaces (APIs). A configuration 24 provides a basic set of libraries and virtual-machine features that must be present in an implementation of a Java ME® environment. One or more profiles 26 are layered on top of the configuration 24. The profile(s) 26 provide higher level APIs for different classes of devices. A profile 26 is a set of standard APIs that support a category of devices for a specific configuration 24. A specific profile 26 may be combined with a corresponding configuration 24 to provide a complete Java® application environment for a target device class. On top of the profile(s) 26 may be one or more optional packages 30 that provide APIs for device-specific features. Various applications 40 that conform to the to the profile(s) 26 may be implemented on the device.
As an example of a profile 26, Mobile Information Device Profile (MIDP) is a specification published for the use of Java on relatively limited mobile and/or embedded devices. The MIDP specification defines a platform for dynamically and securely deploying optimized, graphical, networked applications 40. Note that an application that conforms to MIDP may be referred to as an MIDP applet, or MIDlet. MIDP is part of the Java ME® framework and is layered on top of a configuration 24 that provides a set of lower level APIs. Examples of other profiles that may be used in some platform stack implementations include, but are not limited to, Personal Basis Profile (PBP), and Personal Profile (PP). Examples of configurations 24 include Connected Device Configuration (CDC) and Connected Limited Device Configuration (CLDC). When combined with CDC or CLDC, MIDP provides a standard Java® runtime environment for relatively limited mobile and/or embedded devices. The configuration 24 (e.g., CDC or CLDC) and profile(s) 26 (e.g., MIDP 2.x or 3.x) together provide the core application functionality required by applications on the target devices such as mobile applications in the form of a standardized Java® runtime environment and a set of Java® APIs. Using MIDP (or other profiles, in some implementations), developers can develop applications once, and deploy the applications quickly to a wide variety of devices.
Different versions of MIDP, for example MIDP 2.x and MIDP 3.x, may be used in various Java ME® platforms on a variety of devices. In addition, the MIDP specification defines several security protection domains (which may be referred to as protection domains for simplicity). A protection domain may be defined as a set of permissions that controls which protected APIs an applet can use. For example, MIDP 2.x and/or MIDP3.x may support the following protection domains as defined by the respective specification: Operator, Manufacturer, Identified 3rd Party, Unidentified 3rd Party, and Custom.
Depending on the profile specification, a protection domain may expose different behaviors and requirements for security-sensitive APIs. In other words, the protection domains may be viewed as operation modes. Implementations of the Java ME® platform being developed for deployment may need to be tested under these different operation modes in order to validate behavior to determine if the Java ME® platform implementations conform to the protection domains as defined by the profile specifications. In addition to testing across the different protection domains, the testing may need to be performed for different versions of the profile specification, for example MIDP 2.x and MIDP 3.x specifications. In addition, the testing may need to be performed on different devices, for example mobile and/or embedded devices from different vendors or manufacturers or different versions of mobile and/or embedded devices from the same vendor or manufacturer.
However, conventional testing frameworks for Java ME® platform implementations do not readily support testing across different protection domains, profile specification versions, and devices. Conventional test suites run tests only in one protection domain, or operation mode. Conventionally, to test in the different protection domains or operation modes according to the different versions of the MIDP specification and to test on different platforms, different tests have to be developed and run.